import { handleActions } from 'redux-actions';
import actionTypes from '../action-types/responsive';

const initialState = {
  isMobile: false,
};

const reducer = handleActions({
  [actionTypes.RESPONSE_CHANGE]: (state, { payload: isMobile }) => ({
    ...state,
    isMobile,
  }),
}, initialState);

export default reducer;
